MC> 2. TurboVision, a simplified application development
MC> interface (for screens and windows and such. This appears
MC> to be created for newer TP programmers who haven't used
MC> after-market libraries, such as TPro, TechnoJocks Turbo
MC> Toolkit, or Eagle. It's a new way of doing things many of
MC> us already have "in hand", IMO.
KL> So, is TV any better than any of the "after-market
KL> libraries"? I've been using TechnoJocks Turbo Tookit and I
KL> found it excellent.
As far as I'm concerned TV doesn't have any competitor or real equivalent
in the market place. The closest would be OPro, but even that is really
aimed at a different philosophy. TV does a different job to OPro and so
the two cannot be legitimately
compared. Both are brilliantly successful in achieving their design aims.
TTT and TV are really unrelated in what they set out to achieve.
I suppose that I am really saying that I disagree with Mike's assessment
of TV and what TV is and does. It is most certainly NOT for newer TP programmerin fact I consider that it is closer to the mark to say the reverse. I say
all this
knowing that many in this echo are thinking "that isn't what he said 12
months ago", and they are right... I have changed my opinion, largely due
to the prodding of others whose opinions I respect very much.
TeeCee
* Origin: The Pilbara's Pascal Centre (+61 91 732569) (3:690/644)
MH> have you in your travels come across a simple (or even complex) way
of
MH> allowing a variable number of parameters for a procedure? I am
MH> assuming that
MH> it is possible as many of the TP procedures allow it. Ie Write().
The compiler parses write/writeln/read/readln and all the other procedures
that permit a variable number of parameters at compile time. What you are
trying for is something for runtime - quite a different thing. Not possible
without kludges
such as passing a pointer to a linked list of variables which can then be
traversed and processed.
I suggest a rethink is in order as a simple reassessment of your design philosopshould be all that is required. Why not post the details of your problem?
TeeCee
* Origin: The Pilbara's Pascal Centre (+61 91 732569) (3:690/644)
KH> For a program called ACODES. Actually, I'd like to see any routines
KH> that can be used to encode or otherwise protect a program's data files
KH> from (easy, at least) hacking. Routines should not only encode the
KH> data, but should check to ensure that the data has not been modified
KH> since last written....
Here is a simple routine that will encode or decode a variable. All that
needs to be done is call the routine with either a 4 character password (or
better still a 4 byte longint value) and the variable will be coded using
a very simple algorithm.
To decode do it again. If you forget your password or key you will have
a very difficult - almost impossible job to decode it.
The routine also requires that you pass the size of the data for coding/decodingA too-high value here will cause disaster so best to pass it as sizeof(TheData)In other words the same caveats as move/fillchar/BlockRead etc.
This is not suitable for text files as the resulting coded data may contain
control codes.
procedure code(var d,k; len: word);
{ Uses a very simple algorithm to encode d }
const
maxsize = 1024;
var
data : array[1..maxsize] of byte absolute d;
key : longint absolute k;
Bkey : byte;
x : word;
begin
if len > maxsize then { ensure that length of data is within limits }
exit; { or leave procedure without doing any damage }
RandSeed := key;
for x := 1 to len do begin
Bkey := random(256);
data[x] := data[x] xor Bkey;
end;
end; { code }
TeeCee
* Origin: The Pilbara's Pascal Centre (+61 91 732569) (3:690/644)